package base.math;

//最大公约数
public class GCD {
    public static int getGcd(int a, int b) {
        return b != 0 ? getGcd(b,a % b) : a;
    }

    public static void main(String[] args) {
        System.out.println(getGcd(18,12));
    }
}
